package com.exam.serviceimpl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.exam.entity.Consult;
import com.exam.mapper.ConsultMapper;
import com.exam.service.ConsultService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description:
 * @Company：
 * @Author:
 * @Date: 2022/4/29 21:47
 * @Version 1.0
 */
@Service
public class ConsultSerivceImpl implements ConsultService {

    @Resource
    private ConsultMapper consultMapper;

    @Override
    public Integer add(Consult consult) {
        return consultMapper.add(consult);
    }

    @Override
    public IPage<Consult> findAll(Page<Consult> teacherPage, Integer userId,String teacherName,String userName) {
        return consultMapper.findAll(teacherPage,userId,teacherName,userName);
    }

    @Override
    public Consult findById(Integer id) {
        return consultMapper.getById(id);
    }

    @Override
    public Integer update(Consult consult) {
        return consultMapper.update(consult);
    }
}
